Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ARM builds for ArduinoBot #4517

Merged
merged 7 commits into from
Apr 8, 2016
Merged

Added ARM builds for ArduinoBot #4517

merged 7 commits into from
Apr 8, 2016

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Feb 2, 2016

Let's see how it goes...

See #4457

@cmaglie cmaglie added the OS: Linux ARM Specific to the Linux ARM version of the Arduino IDE label Feb 2, 2016
@cmaglie cmaglie self-assigned this Feb 2, 2016
@NicoHood
Copy link
Contributor

NicoHood commented Feb 2, 2016

Do I understand it correct, that the bot will hopefully respond in some minutes with a finished arm build?
excited

@cmaglie
Copy link
Member Author

cmaglie commented Feb 2, 2016

Do I understand it correct, that the bot will hopefully respond in some minutes with a finished arm build?

that is the theory... :)

@ArduinoBot
Copy link
Contributor

Build failed.

1 similar comment
@ArduinoBot
Copy link
Contributor

Build failed.

@cmaglie
Copy link
Member Author

cmaglie commented Feb 2, 2016

@ArduinoBot build this please

@cmaglie
Copy link
Member Author

cmaglie commented Feb 2, 2016

...ahem... :-)

ArduinoBot is a bit shy but he did the work, the link is here:
http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-4517-BUILD-500-linuxarm.tar.xz

this build is still using test_package_arm_index.json, if everything works well I can start to move the armhf version of the avr compilers into the official package_index.json, remove the commit cmaglie@c35250d and trigger another (final) build before merging.

@cmaglie
Copy link
Member Author

cmaglie commented Feb 2, 2016

tested on a RPi2: the IDE starts as expected, build/upload on a Uno works.

tested on a RPi1: crash in liblistserial.so and ctags.
These two packages have been cross-compiled on an x86_64 box, I suspect that the (cross)compiler used ARMv7 instructions (that works only on RPi2). After rebuilding the two packages natively on a RPi2 (like all the other tools) and copying them over on the RPi1 it worked as expected.

Tomorrow I'll fix liblistserial.so and ctags and launch another build.

@sandeepmistry
Copy link
Contributor

Build arduino-PR-4517-BUILD-504-linuxarm.tar.xz looks good on a Raspberry Pi B (v1). I tested compiling and uploading a barebones sketch and blink.

@carlosperate
Copy link
Contributor

I've tried running the ARM build on a Udoo Neo (Cortext A9) and got the following errors:

udooer@udooneo:~/projects/arduino-PR-4517-BUILD-502$ ./arduino
Picked up JAVA_TOOL_OPTIONS: 
Xlib:  extension "RANDR" missing on display ":1".
Tool name : avrdude 6.0.1-arduino5
     sys : i386-apple-darwin11 
     sys : x86_64-linux-gnu 
     sys : i686-linux-gnu 
     sys : i686-mingw32 
 seems to have no downloadable contributions for your operating system, but it is installed in
/home/udooer/projects/arduino-PR-4517-BUILD-502/hardware/tools/avr
Tool name : avr-gcc 4.8.1-arduino5
     sys : i386-apple-darwin11 
     sys : x86_64-linux-gnu 
     sys : i686-linux-gnu 
     sys : i686-mingw32 
 seems to have no downloadable contributions for your operating system, but it is installed in
/home/udooer/projects/arduino-PR-4517-BUILD-502/hardware/tools/avr
java.lang.NullPointerException
    at processing.app.BaseNoGui.createToolPreferences(BaseNoGui.java:851)
    at processing.app.BaseNoGui.initPackages(BaseNoGui.java:609)
    at processing.app.Base.<init>(Base.java:295)
    at processing.app.Base.guardedMain(Base.java:222)
    at processing.app.Base.main(Base.java:136)

You can ignore the Xlib issue, I think it's caused by the remove desktop and I get the same running the Udoo version of the Arduino IDE and that one works correctly. It looks like it is the avrdude issue that's causing the crash in this case.

@cmaglie
Copy link
Member Author

cmaglie commented Feb 5, 2016

@NicoHood
I did a small research about performance comparison between armv6 vs armv7 and it seems that there are conflicting opinions about which one performs better especially in real world environments.

https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=99963
http://www.mikronauts.com/raspberry-pi/raspberry-pi-2-raspbian-vs-linero-armv6-vs-armv7/
(in particular see the unexpected conclusions on page 2!)
http://stackoverflow.com/questions/3310907/what-are-the-advantages-of-armv7-over-armv6-when-compiling-iphone-apps

Looking at the above, I prefer to keep things simple and do only one build for armv6 (that is also the Raspbian default).

@cmaglie
Copy link
Member Author

cmaglie commented Feb 5, 2016

@carlosperate,

It looks like it is the avrdude issue that's causing the crash in this case.

It seems that you already run another version of the Arduino IDE on this system, since this is still an experimental build you need to test it in a "clean" enviroment, in particular you should remove or rename the folder ~/.arduino15. Keep in mind that if you remove the ~/.arduino15 folder you will lose your preferences and 3rd party cores that you may have installed through boards manager, so if you're actively using the IDE renaming the folder (and restoring it when you finished testing) is probably the best option for you.

@ShorTie8
Copy link

ShorTie8 commented Feb 5, 2016

 I prefer to keep things simple and do only one build for armv6 (that is also the Raspbian default).

So this is not for arm, but just the raspberry pi foundation ??

@cmaglie
Copy link
Member Author

cmaglie commented Feb 5, 2016

So this is not for arm, but just the raspberry pi foundation ??

Sorry @ShorTie8, who said that?
have you tested the build on your boards?

@ShorTie8
Copy link

ShorTie8 commented Feb 5, 2016

Sorry, No I have not, been trying to provide a none hacked version that anyone can compile .. :/~

@cmaglie
Copy link
Member Author

cmaglie commented Feb 5, 2016

Try the linuxarm build that ArduinoBot prepared here:

#4517 (comment)

(this is the link to download http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-4517-BUILD-504-linuxarm.tar.xz )

As I suggested to Carlos, remove/rename the ~/.arduino15 folder if you already have one.

@ShorTie8
Copy link

ShorTie8 commented Feb 5, 2016

your build seems to work ok on a Odroid C1,
At least with my scientific test of compiling BlinkWithoutDelay.

Good Job
Thankz

Now all we need is someone with a phone or table that could try it, lol.
You know, Your out in the field and want to make a quick test, Whip out your phone and redo.
Ok, maybe not phone, but tablet maybe, hehe.

@ShorTie8
Copy link

ShorTie8 commented Feb 5, 2016

But isn't arduino/arduino-builder#76 a hack ??
Does the arduino-builder the IDE uses also run from the command line too ??
Guess at least for the test, the src directory needs copied over for the go stuff

@cmaglie
Copy link
Member Author

cmaglie commented Feb 5, 2016

The only "hack" is to use test_packages_arm_index.json instead of package_index.json.

But this is for a good reason: package_index.json is the official source for the Boards Manager of the Arduino IDE, every time you open the Board Manager the IDE will updates his packages list by downloading this file. That's the reason why I cannot use it for tinkering and making tests, because any error on that file will affect thousand of users, that are probably not interested in the experiments we are doing here.

Now that you have tested with the Odroid C1 (thanks for doing the tests!) I feel more confident to move the listing of ARM tools from the testing json to the official json. Once this is done we can remove the hack and merge the change to arduino-builder upstream.

@NicoHood
Copy link
Contributor

NicoHood commented Feb 5, 2016

@ShorTie8 can you please stop these things like

So this is not for arm, but just the raspberry pi foundation ??

They just try to be compatible with all arm systems. arm6 and arm7. This has nothing to do with the pi foundation. They dont get a singe buck for publishing arm builds. But if they do, they want to make it compatible to all systems.

And it also works on newer systems with arm7. This should include beagle bone, odroid, cubie and all other boards. And as he said arm6 is not that slower overall. And I aggree with that now too.

So please stop offending them, while they now finally listen to us and make arm builds working now. This doesnt help in any way.

@cmaglie great work! Thanks a lot!

@spiderkeys
Copy link

@cmaglie Kudos from me as well. I've been using a bunch of hacks to get a proper lightweight build environment set up on the Beaglebone Black, so I'm glad to see that the arm build is getting some love.

On the Beaglebone Black and our Scaleways armV7 build server, I was able to successfully build our robot's firmware using ArduinoBot's build of arduino-builder you linked earlier.

Still need to verify that I can pull out my hacked build variables like the hardcoded paths for CMSIS and ctags in platform.local.txt when using arduino-builder. Will get back on that soon.

@PaulStoffregen
Copy link
Contributor

So this is not for arm, but just the raspberry pi foundation ??

As one of the many people who develops with the Arduino software as a base for third party products, I'm happy to see an ARM build finally happening, which is why I put some work into contributing with the toolchain build.

But I hope everyone can keep in mind this is increasing the numbers of builds Arduino and many third parties will support, from 4 to 5. Already Linux builds are half of the files maintained, in support of a user base that is a relatively small minority compared to Windows and Macintosh. Linux will soon account for 60% of the builds.

The last thing I'd want to see here is allowing the Linux builds to creep to even more!

@Testato
Copy link

Testato commented Feb 8, 2016

For people that already have an ARM arduino IDE installed, please use the official Portable option.
You must create a folder named "portable" in the arduino folder and all file remain inside it. In this way you will not loose your arduino15 setting.

I will try it on BeagleBone

@Testato
Copy link

Testato commented Feb 8, 2016

Do not work on BeagleBone.

the initial logo start:

loading configuration....
initializing package....
preparing board....
starting....

and immediately exit, whitout error

@FatGut
Copy link

FatGut commented Feb 8, 2016

Hello
Very new to this whole Github and software code stuff was wondering if I could ask a questions?
I have been following this Arduino IDE Code for over a month now and finally downloaded the code? or File? to my Raspberry pi 2 running Wheezy, unzipped it but cant figure out for the life of me how to install it? I have purchased a couple of books, Raspberry Pi user Guide By Eben Upton, after reading it still no clue? more of a set up Guide and some basic commands, Also Teach yourself Python Programming for Raspberry Pi in 24 Hours. Haven't finished it yet! but Great book on code structure and the like. would some one be willing to teach this "OLD" dog a new trick.
Thanks in advace.
Rick

@NicoHood
Copy link
Contributor

NicoHood commented Mar 9, 2016

Could you provide an official (beta) build for arm since 1.6.8 is out now? So we got a working version of an official release so far.

@Testato
Copy link

Testato commented Mar 9, 2016

Sorry but on beaebone the upload do not work, like i writed. Want you release an Arm version officially withiut BBB support ?

@NicoHood
Copy link
Contributor

NicoHood commented Mar 9, 2016

No I suggested to release the version "as it is" as beta release. It may not work with all boards yet, but we have somehow a release version (1.6.8). BBB support needs to be fixed for sure in future nightly builds and then go into 1.6.9 (beta or maybe stable)

@PaulStoffregen
Copy link
Contributor

I would also like to request building the 1.6.8 tag as-is and putting it on the website as a 6th download.

Arduino has in the past put an extra "experimental" extra build for Macintosh on the website, so there's at least some precedent for this. Even if it doesn't work on all ARM boards, working on at least RPi2 will allow more much-needed user feedback.

@blfuentes
Copy link

arduino-PR-4517-BUILD-514-linuxarm.tar.xz works for me on my rpi 3.
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian


Linux raspberrypi 4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux

Changes I noticed:
-briged, firmdata, mouse, keyboard libraries up to date.

@docbender
Copy link

Good job..

Build 514 works on BananaPi (arm7l, Ubuntu 14.04)

@danpospisil
Copy link

Perfect! Works flawlessly with RPI3

@cmaglie cmaglie merged commit 63fc618 into arduino:master Apr 8, 2016
@cmaglie cmaglie added this to the Release 1.6.9 milestone Apr 8, 2016
@cmaglie
Copy link
Member Author

cmaglie commented Apr 8, 2016

Ok the time to have an ARM hourly-build has come :-)

I've also rebuilt avr-gcc and avrdude without dependency from glibc >2.13, this should solve the issue experienced by @Testato too.

Let's see if the bot works as it should...

@cmaglie cmaglie deleted the arm-2 branch April 8, 2016 18:22
@NicoHood
Copy link
Contributor

NicoHood commented Apr 8, 2016

@cmaglie Thank you for merging this. This is another great step of the Arduino IDE getting a lot more flexible and useful. Good job :) Looking forward to see an experimental/stable 1.6.9 release ;)
I hope the nightly build will also contain an arm build on the website.

@cmaglie
Copy link
Member Author

cmaglie commented Apr 9, 2016

I hope the nightly build will also contain an arm build on the website.

Of course, BTW to see the download link on https://www.arduino.cc/en/Main/Software I guess that we must wait Monday morning (unless our web-master see my email and decides to edit the page before then :-)).

BTW for who don't want to wait further, @ArduinoBot did the build, here the link to the nightly:

https://downloads.arduino.cc/arduino-nightly-linuxarm.tar.xz

this build is now "live", in the sense that is updated together with the other hourly builds!

@lemio
Copy link
Contributor

lemio commented Apr 10, 2016

I got it working on a Raspberry Pi 2B, I only cannot add third party boards. it show the error in the console: "unknown protocol: ttp"

@cmaglie
Copy link
Member Author

cmaglie commented Apr 11, 2016

@lemio make sure that the external boards manager url contains the starting "h" in http://.....

@NicoHood
Copy link
Contributor

Wow. It was so obvious, even me didn't get that. :D

@NicoHood
Copy link
Contributor

Why is there no official ARM build for 1.6.9? It could be marked as experimental, but would at least be the same version as the desktop downloads.

@facchinm
Copy link
Member

Hi Nico, we missed the link on the download page, now it is ok 😉

@t3g
Copy link

t3g commented Jun 7, 2016

At first kudos from me, you have done awesome work!

There is sth. wrong with liblistSerialsj.so in all newer builds 1.6.9 and in the April-26 + June-06 nightly builds, as pointed out in http://forum.arduino.cc/index.php?topic=397174
On the Pi2 it works well, but it crashes on the Pi Zero :(.

@t3g
Copy link

t3g commented Jun 11, 2016

Probably there is a problem (missing flags?) with the compilation of liblistSerials by ArduinoBot because it doesn't work on ARM v6.
An old precompiled 1.0.5 version (by NicoHood - https://github.com/NicoHood/Arduino-IDE-for-Raspberry/tree/master/binaries) works flawlessly on my Pi2 and Pi Zero (ARM v7/v6)
Hope it helps you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS: Linux ARM Specific to the Linux ARM version of the Arduino IDE
Projects
None yet
Development

Successfully merging this pull request may close these issues.